<?php
namespace App\Traits;

use App\Services\Api\Api;
trait MainApiTrait
{
    /**
     * 根据领域获取技术路径
     * @param  [type] $apiCode [description]
     * @param  [string] $domains [领域字符串，多个用 , 号隔开]
     * @return [type]          [description]
     */
    public function domainGetTechRoute($apiCode, $domains)
    {
        $obj = new Api();
        $formData = [
            'domainIds' => $domains,
        ];
        $postData = $obj->getJavaPostData($apiCode, $formData);
        $result = $obj->getJavaResponseData($postData);
        return $result ? $result['list'] : [];
    }

}
